<template>
  <div class="container">
    <div class="search-box">
      <el-form :inline="true" :model="searchForm" size="small">
        <el-form-item label="站点" class="form-item">
          <el-select v-model="searchForm.region" placeholder="活动区域">
            <el-option label="区域一" value="shanghai"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="工艺环节" class="form-item">
          <el-select v-model="searchForm.region" placeholder="活动区域">
            <el-option label="区域一" value="shanghai"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="参数选择" class="form-item">
          <el-select v-model="searchForm.region" placeholder="活动区域">
            <el-option label="区域一" value="shanghai"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="具体参数" class="form-item">
          <el-select v-model="searchForm.region" placeholder="活动区域">
            <el-option label="区域一" value="shanghai"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item class="form-item">
          <el-button type="primary" @click="onSubmit">查询</el-button>
        </el-form-item>
      </el-form>
    </div>
    <div class="table-box">
      <el-table :data="tableData">
        <!-- <el-table-column prop="date" label="站点" width="220">
        </el-table-column> -->
        <!-- <el-table-column prop="name" label="工艺环节" width="220">
        </el-table-column> -->
        <!-- <el-table-column prop="name" label="参数选择" width="220">
        </el-table-column> -->
        <el-table-column prop="name" label="具体参数"> </el-table-column>
        <el-table-column prop="name" label="限制值" width="180">
          <template slot-scope="scope">
            <el-input v-model="scope.row.name" placeholder="请输入内容"> </el-input>
          </template>
        </el-table-column>
        <!-- <el-table-column prop="name" label="修改时间"> </el-table-column> -->

        <el-table-column prop="name" label="操作" width="180" fixed="right">
          <template slot-scope="scope">
            <el-button
              type="primary"
              size="mini"
              @click="checkData(scope.$index, scope.row)"
              >查看</el-button
            >
            <el-button
              size="mini"
              type="danger"
              @click="editData(scope.$index, scope.row)"
              >修改</el-button
            >
          </template>
        </el-table-column>
      </el-table>
      <div class="page-box">
        <el-pagination
          background
          :page-size="20"
          layout="prev, pager, next"
          :total="1000"
          class="page-pos"
        >
        </el-pagination>
      </div>
    </div>
    <el-dialog
      title="参数编辑"
      :center="true"
      :visible.sync="dialogVisible"
      width="35%"
    >
      <el-form :model="searchForm" size="small" label-width="80px">
        <el-form-item label="站点" class="form-item">
          <el-select v-model="searchForm.region" placeholder="活动区域">
            <el-option label="区域一" value="shanghai"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="工艺环节" class="form-item">
          <el-select v-model="searchForm.region" placeholder="活动区域">
            <el-option label="区域一" value="shanghai"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="参数选择" class="form-item">
          <el-select v-model="searchForm.region" placeholder="活动区域">
            <el-option label="区域一" value="shanghai"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="具体参数" class="form-item">
          <el-select v-model="searchForm.region" placeholder="活动区域">
            <el-option label="区域一" value="shanghai"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="限制值">
          <el-input
            v-model="searchForm.ww"
            placeholder="限制值"
            style="width: 190px"
          ></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="updateData">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>


<script>
export default {
  data() {
    return {
      form: {},
      searchForm: {},
      dialogVisible: false,
      tableData: [
        {
          station: "",
          date: "2016-05-02",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1517 弄",
        },
        {
          date: "2016-05-01",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1519 弄",
        },
        {
          date: "2016-05-03",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1516 弄",
        },
      ],
    };
  },
  mounted() {},
  methods: {
    onSubmit() {},
    handleEdit(index, data) {
      this.dialogVisible = true;
    },
    updateData() {
      this.dialogVisible = false;
    },
  },
};
</script>
<style scoped lang="scss">
.container {
  padding: 10px 10px;
}
.search-box {
  .form-item {
    margin-right: 20px;
  }
}
.table-box {
  margin-top: 20px;
  padding: 0 30%;

  .page-box {
    position: relative;
    //width: 100%;
    padding: 20px 0;
    .page-pos {
      position: absolute;
      right: 0;
    }
  }
}
::v-deep .el-form-item__label {
  color: #6da7f0;
}
::v-deep .el-input__inner {
  background-color: transparent !important;
  border: 1px solid #75f9fd;
}
</style>